- I am a basic text value. My id="demotxt".
My ID needs to be included in the "var text" array
near the top of the included script file. If you
broadcast my value i will display that value as text. -
demotxt
- I am a basic button. My name="Demo", id="WSbutton"
data-action="demobtn", I also have a class="datasend".
I need all of these attributes applied.
Given said attributes i will generate this
event: Demo.WSbutton(u 'demobtn'). I do
not need to be added to an array. Give me
a class="ui-btn" & Jquery will style
me this way. -
- I am a FlipSwitch. My Title="FlipSwitch"
name="Flip" id="DemoSwitchselect" data-role="flipswitch".
I need all of these attributes applied. My
Title must always be "FlipSwitch".
Given said attributes i will generate this
event: Flip.DemoSwitchselect(u 'True/False'). If you
broadcast a value of "True" to my ID i
will move to the On Positon or Off position if you broadcast a
value of False. My ID needs to be
included in the "var toggles" array
near the top of the included script file. -
- I am a SelectMenu. My Title="SelectMenu"
name="Demo" id="SelectMenu".
I need all of these attributes applied. My
Title must always be "SelectMenu".
Given said attributes i will generate this
event: Demo.SelectMenu(u '1,2,3,4,5'). I do
not need to be added to an array. -
- I am a CheckSelect. My name="Basic" id="checktoggle"
I need all of these attributes applied.
Given said attributes i will generate this
event: Basic.checktoggle(u 'True/False'). If you
broadcast a value of "True" to my ID i
will change to the On Positon or Off position if you broadcast a
value of False. My ID needs to be
included in the "var checks" array
near the top of the included script file. -
- I am a Range Slider. My name="Demo" id="DemoSlider"
I need all of these attributes applied.
Given said attributes i will generate this
event: Demo.DemoSlider(u '0-100'). If you
broadcast a value of "50" I
will move to the middle of the range. My ID needs to be
included in the "var sliders" array
near the top of the included script file. -
- I am a Image Button. My name="button" id="DemoImgButton"
data-action="IMGbutton" class="datasend". I
need all of these attributes applied.
Given said attributes i will generate this
event: button.DemoImgButton(u 'IMGbutton'). If you
broadcast a value of "True" to my ID i
will change to my image src to DemoImgButtonTrue.png or
DemoImgButtonFalse.png if broadcast a value of "False". My
ID needs to be included in
the "var imgbuttons" array
near the top of the included script file. I
also need to have images for both true & false states
included in the /images/buttons folder. - I am a Ajax Post. I am too unique to be set globally.
For further examples, see other ajax posts in index.html.
In this example, I have an id="demoajax".
The text elements have id="payload1"
& id="payload2". I will generate this event:
Demo.Ajax(u 'payload1value', u 'payload2value') -
- I am toggle show/hide element. Set my value to hide and
I will dissappear, Send a value of anything else & I will reappear.
My #id needs to be included in the var show/hide array
near the top of the included script file. -
Press button to show/hide me
- I am function UpdateSelect. broadcast data to update my items.
My data id and selectmenu id need to be added to
the WS Message function in the included script .
Press the button to update the select -
- I am function UpdateMenu. broadcast data to update my items.
My data id and ul id need to be added to
the WS Message function in the included script .
Press the button to update the ul. -
- I am a Dynamic button that was created
programatically via Javascript on pageload.
My name="dynamic" title="button"
data-action="action" class="dynamicdatasend". I
need all of these attributes applied.
Given said attributes i will generate this
event: dynamic.button(u 'action'). I do
not need to be added to an array.
Demo